package com.loan.exeception;

import io.swagger.annotations.ApiModelProperty;

/**
 * 这个枚举类中定义的都是跟业务有关的异常
 * @author zhangchong
 *
 */
public enum AppExceptionCodeMsg {
    //自定义异常
    PRODUCT_NOT_FOUND(10010,"产品不存在"),
    APPLY_INSERT_ERROR(10011,"申请贷款失败"),
    APPLY_LOAN_ILLEGAL(10012,"贷款金额不合法"),
    AVALOAN_NOT_ILLEGAL(10013,"测额失败"),
    MEASURE_INSERT_ERROR(10014,"测额失败"),
    APPLY_LOAN_ERROR(10015,"申请提额失败"),
    MESSAGE_NOT_FOUND(10016,"资讯未找到"),
    AMOUNT_NOT_ILLEGAL(10017,"贷款金额太少"),
    QUICK_APPLY_ERROR(10018,"快速申请贷款失败"),
    PHONE_NUMBER_IS_NULL(10020,"手机号码不能为空"),
    CODE_NUMBER_IS_ERROR(10021,"验证码输入错误"),
    PHONE_NUMBER_IS_ILLEGAL(10022,"手机号码格式错误"),
    SEND_MESSAGE_IS_ERROR(10023,"验证码发送失败"),
    ;

    //状态码
    @ApiModelProperty("服务端返回的状态码")
    private int code ;
    //状态码提示信息
    @ApiModelProperty("状态码提示信息")
    private String msg ;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }


    AppExceptionCodeMsg(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

}